home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Informant Complete 1995 - 2000
/
Delphi Informant Complete 1995 to 2000.iso
/
Delphi Informant Magazine Complete Works SOURCE CODE 1998.rar
/
1998
/
Apr
/
di9804bm
/
Notify_TLB.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-12-15
|
2KB
|
89 lines
unit Notify_TLB;
{ This file contains pascal declarations imported from a type library.
This file will be written during each import or refresh of the type
library editor. Changes to this file will be discarded during the
refresh process. }
{ File Notification Server Library }
{ Version 1.0 }
interface
uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
const
LIBID_Notify: TGUID = '{64624091-5B32-11D1-8193-000000000000}';
const
{ Component class GUIDs }
Class_Notify: TGUID = '{64624093-5B32-11D1-8193-000000000000}';
type
{ Forward declarations: Interfaces }
INotify = interface;
INotifyDisp = dispinterface;
INotifier = interface;
INotifierDisp = dispinterface;
{ Forward declarations: CoClasses }
Notify = INotify;
{ Dispatch interface for Notify Object }
INotify = interface(IDispatch)
['{64624092-5B32-11D1-8193-000000000000}']
function Connect(const notifier: INotifier; const sDir: WideString; iMode: Integer; fSubTree: WordBool): Integer; safecall;
procedure Disconnect(hNotify: Integer); safecall;
end;
{ DispInterface declaration for Dual Interface INotify }
INotifyDisp = dispinterface
['{64624092-5B32-11D1-8193-000000000000}']
function Connect(const notifier: INotifier; const sDir: WideString; iMode: Integer; fSubTree: WordBool): Integer; dispid 1;
procedure Disconnect(hNotify: Integer); dispid 2;
end;
{ Event interface exported by server and implemented by client }
INotifier = interface(IDispatch)
['{64624094-5B32-11D1-8193-000000000000}']
procedure Change(const sDir: WideString; iMode: Integer; fSubTree: WordBool); safecall;
end;
{ DispInterface declaration for Dual Interface INotifier }
INotifierDisp = dispinterface
['{64624094-5B32-11D1-8193-000000000000}']
procedure Change(const sDir: WideString; iMode: Integer; fSubTree: WordBool); dispid 1;
end;
{ Coclass for Notify object }
CoNotify = class
class function Create: INotify;
class function CreateRemote(const MachineName: string): INotify;
end;
implementation
uses ComObj;
class function CoNotify.Create: INotify;
begin
Result := CreateComObject(Class_Notify) as INotify;
end;
class function CoNotify.CreateRemote(const MachineName: string): INotify;
begin
Result := CreateRemoteComObject(MachineName, Class_Notify) as INotify;
end;
end.